var min= ""; var isMin = false; var appVersion = "4.1.1"; /* aws 1.3 */ var isDebug=true; var showStyle = { display: "block", visibility: "visible"}; var hideStyle = { display: "none", visibility: "hidden"}; var userJson = '{"loginId":"guest","validId":true,"validPassword":true,"authorizations":{},"userGroups":{},"preferences":{},"autoLoginIndicator":0,"employee":false,"authForUpdateAll":false,"authForUpdateContact":false,"userIsSystemAdmin":false,"userIsBusinessManager":false,"remoteCreditCardsOnFile":false,"funds":[],"account":{"id":17912,"accountId":"wtgPublic","companyName":"NJFlood","organization":{"name":{"orgName":"NJFlood"},"businessId":"","type":0,"id":897992,"primaryAddress":{"city":"","stateOrProvince":"","country":"","zip":{"zip1":"","zip2":""},"type":"","addressLines":["","",""]},"addresses":[],"roles":{},"relatedParties":[]},"accountType":0,"active":true,"paymentType":0,"notes":[],"canAddAccounts":0,"licensedProducts":[{"id":377552,"accountId":17912,"productId":310,"effectiveDate":"Aug 23, 2014","priceAdjusted":false,"prodName":"njpft","prodDisplayName":"Third party"}],"creditLimit":0.0,"creditPercentOfSales":0,"creditFundAmount":0.0,"adLevel":0,"enableAllProducts":true,"emitPricingOnReports":0,"alwaysManuallyPrepare":0,"alwaysQC":0,"useOldTemplate":0,"useRasterMaps":0,"fulfillmentOverride":0,"excludeMapImages":0,"excludeLenderForm":0,"excludePropertyReport":0,"sendSalesNotification":0,"migrateToPro":0,"isForInternalUse":0,"licensedAppURL":".njflood.com/njpft/order?userAction\u003dinitOrder\u0026accountId\u003dwtgPublic\u0026clientKey\u003dE019A2F7F086F748AA7593A1F67635FB\u0026defaultCounty\u003d1\u0026defaultMuni\u003d","licensedApp":{"id":377552,"accountId":17912,"productId":310,"effectiveDate":"Aug 23, 2014","priceAdjusted":false,"prodName":"njpft","prodDisplayName":"Third party"},"clientType":127,"clientTypeLabel":"Other","profileAndAuthorizationServiceURL":"","njfloodScript":"\u003cscript id\u003d\u0027njpf\u0027 src\u003d\u0027//www.njflood.com/njpft/order?a\u003dload\u0026accountId\u003dwtgPublic\u0026clientKey\u003dE019A2F7F086F748AA7593A1F67635FB\u0027 async\u003e\u003c/script\u003e","peekOptSections":";5;14;6;15;7;17;8;18;9;19;10;20;11;21;12;22;13;23;","salesContactEmail":"MB","fullAccountInstantiatedTime":"Apr 29, 2024 3:18:10 AM","advSearchExpanded":0,"defaultState":"","defaultLenderId":0,"lenderSearchExpanded":0,"userGroups":[],"pricedCatalog":[{"active":1,"product":{"id":410,"name":"real_gold_flood","displayName":"Realtor Gold Flood subscription","shortName":"Realtor Gold","briefDescription":"A subscription for reduced price Flood Determinations","descriptionURL":"","available":true,"availableDate":"Nov 1, 2016 12:00:00 AM","type":0,"isAddOn":0,"isLicensed":1,"isLicensedApp":0,"productState":"XX","userSelectable":false,"displayOrder":0,"priceOptions":[],"availStates":";XX;"},"catalogId":-99,"productId":410,"displayOrder":-1,"prices":[{"id":83561,"amount":25.0,"accountId":-99,"productId":410,"effectiveDate":"Nov 1, 2016 12:00:00 AM","priceAdjusted":false,"numberOfUnits":10,"allocateToType":4,"subscriptionModel":0,"costPerUnit":2.5}],"selected":false,"fromAccount":17912},{"active":0,"product":{"id":301,"name":"survey","displayName":"Survey","shortName":"Survey","nameAbbrev":"Survey","briefDescription":"Survey","descriptionURL":"","available":true,"availableDate":"Feb 9, 2017 12:00:00 AM","type":0,"isLicensedApp":0,"productState":"NJ","userSelectable":true,"displayOrder":0,"priceOptions":[],"availStates":";NJ;"},"catalogId":-99,"productId":301,"displayOrder":-1,"prices":[],"selected":false,"fromAccount":17912},{"id":7882,"active":1,"product":{"id":2,"name":"flood_det","displayName":"Flood Zone Determination","shortName":"Flood Determination","nameAbbrev":"Flood","briefDescription":"The basic report identifies the flood zone, community number map and panel number, community participation information, insurance \u003cbr\u003eavailability, and map date and entry date. This is where similarities and qualities of service end.","descriptionURL":"http://www.njpropertyfax.com/flood","vendorName":"WTG","vendorProductId":"WTG001","available":true,"availableDate":"Mar 1, 2015 12:00:00 AM","type":0,"isLicensedApp":0,"productState":"WY","userSelectable":true,"displayOrder":1,"priceOptions":[],"availStates":";AK;AL;AR;AS;AZ;CA;CO;CT;DC;DE;FL;GA;GU;HI;IA;ID;IL;IN;KS;KY;LA;MA;MD;ME;MI;MN;MO;MP;MS;MT;NC;ND;NE;NH;NJ;NM;NV;NY;OH;OK;OR;PA;PR;RI;SC;SD;TN;TX;UT;VA;VI;VT;WA;WI;WV;WY;"},"catalogId":17912,"productId":2,"displayOrder":1,"prices":[{"id":80631,"amount":30.0,"accountId":-99,"productId":2,"effectiveDate":"Oct 1, 2013 12:00:00 AM","priceAdjusted":false,"subscriptionModel":0}],"selected":true,"productName":"Flood Zone Determination","fromAccount":17912},{"id":7892,"active":0,"product":{"id":305,"name":"PeekTax","displayName":"Property Peek: TAX","shortName":"Peek: Tax","nameAbbrev":"PeekTax","briefDescription":"A tax oriented report","descriptionURL":"","available":true,"availableDate":"Oct 1, 2013 12:00:00 AM","type":0,"isAddOn":0,"isLicensed":0,"isLicensedApp":0,"productState":"NJ","userSelectable":true,"displayOrder":1,"priceOptions":[],"availStates":";NJ;"},"catalogId":17912,"productId":305,"displayOrder":2,"prices":[],"selected":false,"fromAccount":17912},{"id":7902,"active":1,"product":{"id":306,"name":"PeekDeluxe","displayName":"Property Peek: DELUXE","shortName":"Peek: Deluxe","nameAbbrev":"PeekDeluxe","briefDescription":"A deluxe report","descriptionURL":"","available":true,"availableDate":"Oct 1, 2013 12:00:00 AM","type":0,"isAddOn":0,"isLicensed":0,"isLicensedApp":0,"productState":"NJ","userSelectable":true,"displayOrder":2,"priceOptions":[],"availStates":";NJ;"},"catalogId":17912,"productId":306,"displayOrder":3,"prices":[{"id":89762,"amount":40.0,"accountId":17912,"productId":306,"effectiveDate":"Feb 4, 2020 12:00:00 AM","priceAdjusted":false,"subscriptionModel":0}],"selected":true,"fromAccount":17912},{"id":7912,"active":1,"product":{"id":4,"name":"tidelands","displayName":"Tidelands Report","shortName":"Tidelands Report","nameAbbrev":"Tide","briefDescription":"A map overlay of the tidelands boundaries, riparian rights and claims are established by the state of New Jersey to portions of property \u003cbr\u003elying in areas presently or formerly flowed by tidal waters.","descriptionURL":"http://www.njpropertyfax.com/tidelands","vendorName":"WTG","vendorProductId":"WTG002","available":true,"availableDate":"Jul 30, 2007 12:00:00 AM","type":0,"isLicensedApp":0,"productState":"NJ","userSelectable":true,"displayOrder":3,"priceOptions":[],"availStates":";NJ;"},"catalogId":17912,"productId":4,"displayOrder":4,"prices":[{"id":83401,"amount":50.0,"accountId":17912,"productId":4,"effectiveDate":"Sep 23, 2016 12:00:00 AM","priceAdjusted":false,"subscriptionModel":0}],"selected":true,"fromAccount":17912},{"id":7922,"active":0,"product":{"id":9,"name":"Cat1Stream","displayName":"Category 1 Stream analysis","shortName":"Category One","nameAbbrev":"CatOne","briefDescription":"There are severe restrictions on what can be built within 150ft of a Category 1 stream in New Jersey. (Category 1 being a fresh water stream) WTG can produce a report on a property with the category 1 stream and 150ft buffer.","descriptionURL":"http://www.njpropertyfax.com/wetlands_stormwater","vendorName":"WTG","vendorProductId":"WTG004","available":true,"availableDate":"May 4, 2011 12:00:00 AM","type":0,"isAddOn":0,"isLicensed":0,"isLicensedApp":0,"productState":"NJ","userSelectable":true,"displayOrder":8,"priceOptions":[],"availStates":";NJ;"},"catalogId":17912,"productId":9,"displayOrder":5,"prices":[],"selected":false,"fromAccount":17912},{"id":7942,"active":1,"product":{"id":308,"name":"LOMA","displayName":"LOMA Application","shortName":"LOMA Application","nameAbbrev":"LOMA","briefDescription":"A eLOMA","descriptionURL":"","available":true,"availableDate":"Mar 1, 2015 12:00:00 AM","type":0,"isAddOn":0,"isLicensed":0,"isLicensedApp":0,"productState":"WY","userSelectable":true,"displayOrder":7,"priceOptions":[],"availStates":";AK;AL;AR;AZ;CA;CO;CT;DC;DE;FL;GA;HI;IA;ID;IL;IN;KS;KY;LA;MA;MD;ME;MI;MN;MO;MS;MT;NC;ND;NE;NH;NJ;NM;NV;NY;OH;OK;OR;PA;RI;SC;SD;TN;TX;UT;VA;VT;WA;WI;WV;WY;"},"catalogId":17912,"productId":308,"displayOrder":7,"prices":[{"id":81122,"amount":150.0,"accountId":17912,"productId":308,"effectiveDate":"Sep 26, 2014 12:00:00 AM","priceAdjusted":false,"subscriptionModel":0}],"selected":true,"fromAccount":17912},{"id":11182,"active":1,"product":{"id":309,"name":"eLOMA","displayName":"eLOMA Application","shortName":"eLOMA","nameAbbrev":"eLOMA","briefDescription":"Electronically submitted LOMA for quickest turnaround","descriptionURL":"","available":true,"availableDate":"Sep 17, 2016 12:00:00 AM","type":0,"isLicensedApp":0,"productState":"WY","userSelectable":true,"displayOrder":0,"priceOptions":[],"availStates":";AK;AL;AR;AZ;CA;CO;CT;DC;DE;FL;GA;HI;IA;ID;IL;IN;KS;KY;LA;MA;MD;ME;MI;MN;MO;MS;MT;NC;ND;NE;NH;NJ;NM;NV;NY;OH;OK;OR;PA;RI;SC;SD;TN;TX;UT;VA;VT;WA;WI;WV;WY;"},"catalogId":17912,"productId":309,"displayOrder":8,"prices":[{"id":83381,"amount":400.0,"accountId":-99,"productId":309,"effectiveDate":"Sep 17, 2016 12:00:00 AM","priceAdjusted":false,"subscriptionModel":0}],"selected":true,"fromAccount":17912},{"id":7932,"active":1,"product":{"id":307,"name":"Survey","displayName":"Elevation Certificate","shortName":"Survey/Elevation Cert.","nameAbbrev":"ElevCert","briefDescription":"Elevation Certificate","descriptionURL":"","available":true,"availableDate":"Oct 1, 2013 12:00:00 AM","type":0,"isAddOn":0,"isLicensed":0,"isLicensedApp":0,"productState":"NJ","userSelectable":true,"displayOrder":8,"priceOptions":[],"availStates":";NJ;"},"catalogId":17912,"productId":307,"displayOrder":9,"prices":[{"id":81012,"amount":800.0,"accountId":-99,"productId":307,"effectiveDate":"Jun 1, 2014 12:00:00 AM","priceAdjusted":false,"subscriptionModel":0}],"selected":true,"fromAccount":17912}],"pricingScheduleId":-99,"contacts":[],"partnerAccountId":0,"quickbooksAccount":"NJFlood","billingProvider":0,"includeReportAsEmailAttach":false,"accountRelatedServices":[{"id":1,"url":"https://www.westerntechnologiesgroup.com/flood-insurance-quote-request","serviceType":1}]},"active":false,"remoteUserAuthorizationsRequired":false,"pricedCatalog":[{"active":1,"product":{"id":410,"name":"real_gold_flood","displayName":"Realtor Gold Flood subscription","shortName":"Realtor Gold","briefDescription":"A subscription for reduced price Flood Determinations","descriptionURL":"","available":true,"availableDate":"Nov 1, 2016 12:00:00 AM","type":0,"isAddOn":0,"isLicensed":1,"isLicensedApp":0,"productState":"XX","userSelectable":false,"displayOrder":0,"priceOptions":[],"availStates":";XX;"},"catalogId":-99,"productId":410,"displayOrder":-1,"prices":[{"id":83561,"amount":25.0,"accountId":-99,"productId":410,"effectiveDate":"Nov 1, 2016 12:00:00 AM","priceAdjusted":false,"numberOfUnits":10,"allocateToType":4,"subscriptionModel":0,"costPerUnit":2.5}],"selected":false,"fromAccount":17912},{"active":0,"product":{"id":301,"name":"survey","displayName":"Survey","shortName":"Survey","nameAbbrev":"Survey","briefDescription":"Survey","descriptionURL":"","available":true,"availableDate":"Feb 9, 2017 12:00:00 AM","type":0,"isLicensedApp":0,"productState":"NJ","userSelectable":true,"displayOrder":0,"priceOptions":[],"availStates":";NJ;"},"catalogId":-99,"productId":301,"displayOrder":-1,"prices":[],"selected":false,"fromAccount":17912},{"id":7882,"active":1,"product":{"id":2,"name":"flood_det","displayName":"Flood Zone Determination","shortName":"Flood Determination","nameAbbrev":"Flood","briefDescription":"The basic report identifies the flood zone, community number map and panel number, community participation information, insurance \u003cbr\u003eavailability, and map date and entry date. This is where similarities and qualities of service end.","descriptionURL":"http://www.njpropertyfax.com/flood","vendorName":"WTG","vendorProductId":"WTG001","available":true,"availableDate":"Mar 1, 2015 12:00:00 AM","type":0,"isLicensedApp":0,"productState":"WY","userSelectable":true,"displayOrder":1,"priceOptions":[],"availStates":";AK;AL;AR;AS;AZ;CA;CO;CT;DC;DE;FL;GA;GU;HI;IA;ID;IL;IN;KS;KY;LA;MA;MD;ME;MI;MN;MO;MP;MS;MT;NC;ND;NE;NH;NJ;NM;NV;NY;OH;OK;OR;PA;PR;RI;SC;SD;TN;TX;UT;VA;VI;VT;WA;WI;WV;WY;"},"catalogId":17912,"productId":2,"displayOrder":1,"prices":[{"id":80631,"amount":30.0,"accountId":-99,"productId":2,"effectiveDate":"Oct 1, 2013 12:00:00 AM","priceAdjusted":false,"subscriptionModel":0}],"selected":true,"productName":"Flood Zone Determination","fromAccount":17912},{"id":7892,"active":0,"product":{"id":305,"name":"PeekTax","displayName":"Property Peek: TAX","shortName":"Peek: Tax","nameAbbrev":"PeekTax","briefDescription":"A tax oriented report","descriptionURL":"","available":true,"availableDate":"Oct 1, 2013 12:00:00 AM","type":0,"isAddOn":0,"isLicensed":0,"isLicensedApp":0,"productState":"NJ","userSelectable":true,"displayOrder":1,"priceOptions":[],"availStates":";NJ;"},"catalogId":17912,"productId":305,"displayOrder":2,"prices":[],"selected":false,"fromAccount":17912},{"id":7902,"active":1,"product":{"id":306,"name":"PeekDeluxe","displayName":"Property Peek: DELUXE","shortName":"Peek: Deluxe","nameAbbrev":"PeekDeluxe","briefDescription":"A deluxe report","descriptionURL":"","available":true,"availableDate":"Oct 1, 2013 12:00:00 AM","type":0,"isAddOn":0,"isLicensed":0,"isLicensedApp":0,"productState":"NJ","userSelectable":true,"displayOrder":2,"priceOptions":[],"availStates":";NJ;"},"catalogId":17912,"productId":306,"displayOrder":3,"prices":[{"id":89762,"amount":40.0,"accountId":17912,"productId":306,"effectiveDate":"Feb 4, 2020 12:00:00 AM","priceAdjusted":false,"subscriptionModel":0}],"selected":true,"fromAccount":17912},{"id":7912,"active":1,"product":{"id":4,"name":"tidelands","displayName":"Tidelands Report","shortName":"Tidelands Report","nameAbbrev":"Tide","briefDescription":"A map overlay of the tidelands boundaries, riparian rights and claims are established by the state of New Jersey to portions of property \u003cbr\u003elying in areas presently or formerly flowed by tidal waters.","descriptionURL":"http://www.njpropertyfax.com/tidelands","vendorName":"WTG","vendorProductId":"WTG002","available":true,"availableDate":"Jul 30, 2007 12:00:00 AM","type":0,"isLicensedApp":0,"productState":"NJ","userSelectable":true,"displayOrder":3,"priceOptions":[],"availStates":";NJ;"},"catalogId":17912,"productId":4,"displayOrder":4,"prices":[{"id":83401,"amount":50.0,"accountId":17912,"productId":4,"effectiveDate":"Sep 23, 2016 12:00:00 AM","priceAdjusted":false,"subscriptionModel":0}],"selected":true,"fromAccount":17912},{"id":7922,"active":0,"product":{"id":9,"name":"Cat1Stream","displayName":"Category 1 Stream analysis","shortName":"Category One","nameAbbrev":"CatOne","briefDescription":"There are severe restrictions on what can be built within 150ft of a Category 1 stream in New Jersey. (Category 1 being a fresh water stream) WTG can produce a report on a property with the category 1 stream and 150ft buffer.","descriptionURL":"http://www.njpropertyfax.com/wetlands_stormwater","vendorName":"WTG","vendorProductId":"WTG004","available":true,"availableDate":"May 4, 2011 12:00:00 AM","type":0,"isAddOn":0,"isLicensed":0,"isLicensedApp":0,"productState":"NJ","userSelectable":true,"displayOrder":8,"priceOptions":[],"availStates":";NJ;"},"catalogId":17912,"productId":9,"displayOrder":5,"prices":[],"selected":false,"fromAccount":17912},{"id":7942,"active":1,"product":{"id":308,"name":"LOMA","displayName":"LOMA Application","shortName":"LOMA Application","nameAbbrev":"LOMA","briefDescription":"A eLOMA","descriptionURL":"","available":true,"availableDate":"Mar 1, 2015 12:00:00 AM","type":0,"isAddOn":0,"isLicensed":0,"isLicensedApp":0,"productState":"WY","userSelectable":true,"displayOrder":7,"priceOptions":[],"availStates":";AK;AL;AR;AZ;CA;CO;CT;DC;DE;FL;GA;HI;IA;ID;IL;IN;KS;KY;LA;MA;MD;ME;MI;MN;MO;MS;MT;NC;ND;NE;NH;NJ;NM;NV;NY;OH;OK;OR;PA;RI;SC;SD;TN;TX;UT;VA;VT;WA;WI;WV;WY;"},"catalogId":17912,"productId":308,"displayOrder":7,"prices":[{"id":81122,"amount":150.0,"accountId":17912,"productId":308,"effectiveDate":"Sep 26, 2014 12:00:00 AM","priceAdjusted":false,"subscriptionModel":0}],"selected":true,"fromAccount":17912},{"id":11182,"active":1,"product":{"id":309,"name":"eLOMA","displayName":"eLOMA Application","shortName":"eLOMA","nameAbbrev":"eLOMA","briefDescription":"Electronically submitted LOMA for quickest turnaround","descriptionURL":"","available":true,"availableDate":"Sep 17, 2016 12:00:00 AM","type":0,"isLicensedApp":0,"productState":"WY","userSelectable":true,"displayOrder":0,"priceOptions":[],"availStates":";AK;AL;AR;AZ;CA;CO;CT;DC;DE;FL;GA;HI;IA;ID;IL;IN;KS;KY;LA;MA;MD;ME;MI;MN;MO;MS;MT;NC;ND;NE;NH;NJ;NM;NV;NY;OH;OK;OR;PA;RI;SC;SD;TN;TX;UT;VA;VT;WA;WI;WV;WY;"},"catalogId":17912,"productId":309,"displayOrder":8,"prices":[{"id":83381,"amount":400.0,"accountId":-99,"productId":309,"effectiveDate":"Sep 17, 2016 12:00:00 AM","priceAdjusted":false,"subscriptionModel":0}],"selected":true,"fromAccount":17912},{"id":7932,"active":1,"product":{"id":307,"name":"Survey","displayName":"Elevation Certificate","shortName":"Survey/Elevation Cert.","nameAbbrev":"ElevCert","briefDescription":"Elevation Certificate","descriptionURL":"","available":true,"availableDate":"Oct 1, 2013 12:00:00 AM","type":0,"isAddOn":0,"isLicensed":0,"isLicensedApp":0,"productState":"NJ","userSelectable":true,"displayOrder":8,"priceOptions":[],"availStates":";NJ;"},"catalogId":17912,"productId":307,"displayOrder":9,"prices":[{"id":81012,"amount":800.0,"accountId":-99,"productId":307,"effectiveDate":"Jun 1, 2014 12:00:00 AM","priceAdjusted":false,"subscriptionModel":0}],"selected":true,"fromAccount":17912}],"name":{},"dayPhone":{"number":{},"make":"","model":""},"eveningPhone":{"number":{},"make":"","model":""},"isFemale":false,"id":999999,"primaryAddress":{"city":"","stateOrProvince":"","country":"","zip":{"zip1":"","zip2":""},"type":"","addressLines":["","",""]},"addresses":[],"fax":{"number":{},"make":"","model":""},"roles":{},"relatedParties":[]}'; var wtgStates = ';01;AL;04;AZ;05;AR;06;CA;08;CO;09;CT;10;DE;11;DC;12;FL;13;GA;16;ID;17;IL;18;IN;19;IA;20;KS;21;KY;22;LA;23;ME;24;MD;25;MA;26;MI;27;MN;28;MS;29;MO;30;MT;31;NE;32;NV;33;NH;34;NJ;35;NM;36;NY;37;NC;38;ND;39;OH;40;OK;41;OR;42;PA;44;RI;45;SC;46;SD;47;TN;48;TX;49;UT;50;VT;51;VA;53;WA;54;WV;55;WI;56;WY;'; function isWTGState(s) { if (wtgStates.indexOf(";" + s + ";") != -1) { return true; } return false; } var propSvcHost = 'www.njpropertyfax.com'; var isAPI=null; var psr=null; var cssURL= '//ecomm.njpropertyfax.com/static/ecomm/pubOrder/clientCSSDev.css' var isMatchMediaSupported = !!(window && window.matchMedia); var mobile; if (isMatchMediaSupported) { mobile = window.matchMedia("only screen and (max-width: 768px)").matches; // matches mfsM.css } else { mobile = (screen.width < 768 ? true : false); } var loadBalancer = 'www.myfloodstatus.com'; var contextPath='/njpft'; var showSearch = false; var touchEnabled=false; var makeAProperty="not a function"; // var stateSel; // alias jquery as $ (function($) { function log(err) { if (console!=undefined) console.log(err); } // define functions in the context of tparty namespace var tparty = { autoSearchProperty : null, appInit: function() { if (isAPI.showSearch) { // jQuery and jQuery UI required jQuery( document ).ready( tparty.initSearch ) } }, cnt : 0, stateSelCallback: function() { if (!isAPI.showSearch) return; var state = $("#states").val(); // ignore the state returned by the propertySearch widget - for some reason it returns "" the first time a state is selected var qs = $("#njf_addrAutoComplete"); if (state==null || state=="" || state.indexOf("Begin t")!=-1) { qs.css("visibility", "hidden"); } else { qs.css("visibility", "visible"); } }, initSearch: function() { var searchCtrl = jQuery("#njf_addrAutoComplete"); if (searchCtrl==null) return; if (searchCtrl.autocomplete == undefined) { //console.log("initSearch - waiting for jquery autocomplete extension to load...."); if (tparty.cnt==10) return; tparty.cnt++; window.setTimeout(tparty.initSearch, 5000 ); } else { //console.log("appInit - instantiate and start PropertySearch...."); var user = { id: "guest" }; try { if (userJson.length > 0) { user = $.parseJSON(userJson); } } catch (e) { console.log(e); } tparty.autoSearchProperty = new PropertySearch({ elementId: "njf_addrAutoComplete", psr: isAPI.psr, useVerUnVer: false, propertyServiceHost: propSvcHost, searchUS: true, stateChangeCallback: tparty.stateSelCallback, limitSearchToWTGStates: false, sortWTGPropertiesFirst: true, getOwnerForSelProp: false, user: user, addlParams: "&tp=1" /* aws 1.3 */ /* flag for apache to set Access-Control-Allow-Origin * for this request */ }); //tparty.autoSearchProperty.start(); } }, genLogoImg: function(url) { var img = $("").attr({ id: "njf_logo", src: url }).addClass("center"); img.click(function(e){ e.preventDefault(); tparty.placeOrder() }); return img; }, addControls: function(root) { // if no options to include additional controls are selected just display the logo if (isAPI.label==null && !isAPI.showSearch) { var applyStyle=false; if (isAPI.logoURL!="") { lurl = isAPI.logoURL; } else { lurl = "https://www.myfloodstatus.com/static/ecomm/images/mfs_largev1.png"; applyStyle=true; } root.after(tparty.genLogoImg(lurl)); if (applyStyle) { $("#njf_logo").css({ padding: "3px", border: "2px solid #1b436b" }); } return; } var main = $("
").attr({ id : "njf_main" }); root.after(main); var mainInner = $("
").attr({ id : "njf_main_inner" }); main.append(mainInner); var img; if (isAPI.logoURL!="") { lurl = isAPI.logoURL; } else { lurl = "https://www.myfloodstatus.com/static/ecomm/images/mfs_largev1.png"; } mainInner.append(tparty.genLogoImg(lurl)) var inner = $("
").attr({ id : "njf_inner" }); mainInner.append(inner); var n = $("
").attr({ id : "njf_msgArea" }).addClass("njf_msg"); inner.append(n); if (isAPI.label!=null) { var hdr = $("
").attr({ id : "njf_hdr" }); inner.append(hdr); var n = $("
").attr({ id : "njf_label1" }).html(isAPI.label).addClass("njf_label"); hdr.append(n); } if (isAPI.showSearch) { var srch = $("
").attr({ id : "njf_srch" }); inner.append(srch); d = $("
").css("margin-top", "3px"); d.append(stateSel); srch.append(d); var inputControl = $("").attr({ id : "njf_addrAutoComplete", name: "njf_addrAutoComplete", type: "text" }).addClass("njf_addrAutoComplete").css("margin-top", "10px"); srch.append(inputControl); var ctrls = $("
").attr({ id : "njf_ctrls" }).css({ "margin-top" : "10px" }); inner.append(ctrls); if (isAPI.selectedProduct != null) { /*var lbl = "";*/ var lbl = isAPI.orderButtonLabel!=undefined ? isAPI.orderButtonLabel : "Order " + selectedProductName; var n = $("").attr({ id : "njf_b1", name: "njf_b1", type: "button", value: lbl }).addClass("njf_button"); n.click(function(e){ e.preventDefault(); tparty.placeOrder(isAPI.selectedProduct); }); ctrls.append(n); } else if (isAPI.showOrderButton) { var n = $("").attr({ id : "njf_b2", name: "njf_b2", type: "button", value: "Order Flood Report Now" }).addClass("njf_button"); n.click(function(e){ e.preventDefault(); tparty.placeOrder(); }); ctrls.append(n); } if (isAPI.showInfo) { var n = $("").attr({ id : "njf_b3", name: "njf_b3", type: "button", value: "Info" }).addClass("njf_button"); n.click(function(e){ e.preventDefault(); tparty.getInfo(); }); ctrls.append(n); } } }, placeOrder: function(prod) { var dynURI = ""; if (prod!=null) { dynURI = dynURI + "&selectedProduct=" + prod; } if (isAPI.psr==undefined) isAPI.psr = {}; var autoAddress = $("#njf_addrAutoComplete").val(); var parcel = tparty.autoSearchProperty!=null ? tparty.autoSearchProperty.getSelectedProperty() : null; var unverSelectedParcel=null; if (parcel!=null) { // use API if user selected an address if (parcel.propertyIdentifier!=undefined && parcel.propertyIdentifier.recordKey!=null) { isAPI.psr.recordKey= parcel.propertyIdentifier.recordKey; } else { unverSelectedParcel=parcel; } isAPI.psr.streetAddress = parcel.label; // whatever the address is on the parcel - may be unverified isAPI.psr.state = parcel.state; // works for both verified and unverified isAPI.psr.fipsCountyId = parcel.propertyIdentifier.countyFIPS; // aws 1.3 isAPI.psr.fipsMuniId = parcel.propertyIdentifier.muniFIPS; // aws 1.3 } else if (autoAddress!=null && autoAddress.trim()!="" && autoAddress.trim().substring(0,5)!="Begin") { // whatever address was typed into the search control as no search result was selected isAPI.psr.streetAddress = autoAddress; } if (isDebug) dynURI = dynURI + "&debug=true"; var authData = '&tp=1&clientKey=' + isAPI.clientKey + '&accountId=' + isAPI.accountId; // send seperately so no need to parse isAPI to auth aws 1.2 dynURI = dynURI + authData + "&isAPIJson=" + encodeURIComponent(JSON.stringify(isAPI)); // aws 1.2 // start aws 1.2 var staticURI= '&isIW=true&a=placeOrder'; var url = "https://" + loadBalancer + contextPath + "/order?tp=1" + staticURI + dynURI + (unverSelectedParcel!=null ? "&unverSelectedParcelJson=" + encodeURIComponent(JSON.stringify(unverSelectedParcel)) : "") ; // end aws 1.2 if (isAPI.orderInNewWindow) { // then pop-up window.open(url + '&orderInNewWindow=yes', 'njf'); } else { document.location = url; } }, getInfo: function() { alert("Pop a dialog with property info or whatever"); } }; var wtg_tpPlugin = tparty; var ns = "wtg_tp"; var loads = []; // html content load deferreds var scripts = []; var css = []; $(document).ready(function() { isAPI = $.parseJSON('{"accountId":"wtgPublic","clientKey":"E019A2F7F086F748AA7593A1F67635FB","authReq":false,"psr":{"PDD":0,"includePanels":false,"includeABFE":false,"includeClaimed":false,"includeGeometry":false,"includeFullModiv":false,"includeSavedProperties":false,"includeNJData":true,"includeNJSalesData":false,"searchPriorYearForNJParcel":false,"getAlternateParcel":false,"retrieveSingleParcel":false,"quickSearch":false,"isFromUI":false,"searchingWithIdOnly":false,"searchExecuted":false,"dontAllowMatchOnOldBlockLot":false},"kiosk":false,"showSearch":false,"showOrderButton":true,"orderButtonLabel":"Click Here","showInfoButton":false,"orderInNewWindow":false,"defaultCounty":"1","defaultMuni":"","cssURL":"//ecomm.njpropertyfax.com/static/ecomm/pubOrder/clientCSSDev.css","logoURL":"//ecomm.njpropertyfax.com/static/ecomm/pubOrder/njflood_njpf.png","mobile":false}') psr = isAPI.psr; stateSel = $("